package xyz.csmcool.imchat.feignclient;

import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
import xyz.csmcool.imutil.utils.ResultTool;
import xyz.csmcool.imutil.webVo.ResultCode;
import xyz.csmcool.imutil.webVo.ResultVo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 什锦
 * @Package xyz.csmcool.imroom.feignclient
 * @since 2022/8/8 0:13
 */

@Component
public class OssFileDegradeFeignClient implements OssClint {
    @Override
    public ResultVo uploadRoomFile(MultipartFile multipartFile) {
        return ResultTool.fail(ResultCode.CUSTOM_FAIL.setMessage("上传图片出错了"));
    }

    @Override
    public ResultVo<HashMap<String, List<String>>> uploadRoomFiles(MultipartFile[] multipartFile) {
        return ResultTool.fail(ResultCode.CUSTOM_FAIL.setMessage("上传图片出错了"));
    }

    /**
     * 分片上传文件确认
     *
     * @param fileName
     * @param uploadId
     * @return
     */
    @Override
    public ResultVo<HashMap<String, String>> completeMultipartUpload(String fileName, String uploadId) {
        return ResultTool.fail(ResultCode.CUSTOM_FAIL.setMessage("上传文件出错了"));
    }
}
